home *** CD-ROM | disk | FTP | other *** search
- Path: ifi.uio.no!usenet
- From: ludvigp@ifi.uio.no (Ludvig Pedersen)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: PPC compilers
- Date: 29 Jan 1996 16:49:51 GMT
- Organization: Dept. of Informatics, University of Oslo, Norway
- Message-ID: <1234.6598T1186T2211@ifi.uio.no>
- References: <4d42gg$i2p@ra.ibr.cs.tu-bs.de> <4dov8s$rc5@ar.ar.com.au>
- <38232132@kone.fipnet.fi> <1205.6597T1252T932@ifi.uio.no> <4e882m$k7u@sunsystem5.informatik.tu-muenchen.de>
- NNTP-Posting-Host: gymir.ifi.uio.no
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
-
- >|> Using
- >|> sub.w dx,dx
- >|>
- >|> instead of
- >|>
- >|> moveq #0,d0
- >|> add.l d1,d0
-
- >what about cmp.x dx,dx
- >won't trash dx ;) the aim was to get X flag 0 right ?
-
- Yes, the aim was to get X flag 0 right!
-
- But your suggestion doesnt work, the X-flag is *NOT* affected by cmp!!!
- (Nice try! ;))
-
- >Clearing X maybe gives less noise, but not correct :)
- Why not?
-
- >|> is faster by-the-way. And since we are only using the lower word of the
- >|> register we don't need to use an extra dataregister.
- >sub.b dx,dx would even have trashed only the lower _byte_ ;)
- >but all instructions tend to need lower byte ;)
-
- No they dont, a typical tmap loop looks like this:
-
- TmapFill: MACRO
- move.w a4,d5 ;2 cycles
- move.b d4,d5 ;2 cycles
- move.l d5,a5 ;2 cycles
-
- move.b (a5),(a1)+ ;7 cycles
-
- addx.l d2,d4 ;2 cycles
- adda.l d3,a4 ;2 cycles
-
- ENDM
-
- So I can trash the lower word of d5 without any risk of bugs.
-
- sub.w d5,d5 will do fine before the loop!
-
-
-
- <sb>Ludde - Amiga Demo Coder
- <sb>Virtual Reality & Official Be developer
- <sb>ludvigp@ifi.uio.no
-
-